package com.benzhuo.widget.research;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
//import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ListView;

import com.benzhuo.widget.research.recycler.RecyclerViewAct;
import com.benzhuo.widget.research.recycler.RefreshAct;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends Activity {


    @BindView(R.id.vShowRecyclerList)
    Button vShowRecyclerList;
    @BindView(R.id.vShowRecyclerGrid)
    Button vShowRecyclerGrid;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    private void toNext(Class t) {
        Intent intent = new Intent(this, t);
        startActivity(intent);
    }

    @OnClick({R.id.vShowRecyclerList, R.id.vShowRecyclerGrid})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.vShowRecyclerList: {
               toNext(RecyclerViewAct.class);
            } break;
            case R.id.vShowRecyclerGrid: {
                toNext(RefreshAct.class);
            } break;
        }
    }
}
